<!DOCTYPE html>
<html>
<head>
    <title>jQuery WeUI</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
    ">

    <link rel="stylesheet" href="/lib/weui.min.css">
    <link rel="stylesheet" href="/css/jquery-weui.css">
    <link rel="stylesheet" href="/css/dist.css">

</head>

<body ontouchstart>

    <div class="weui-msg">
        <div class="weui-msg__icon-area"><i class="weui-icon-warn weui-icon_msg"></i></div>
        <div class="weui-msg__text-area">
            <h2 class="weui-msg__title">操作失败</h2>
            <p class="weui-msg__desc"><%= msg %></p>
        </div>
        <div class="weui-msg__opr-area">
            <p class="weui-btn-area">
                <% if(docs.button){ %>
                    <a href="javascript:;" id="button" class="weui-btn weui-btn_primary"><%= docs.button %></a>
                    <% } %>
                    <a href="javascript:;" id="close" class="weui-btn weui-btn_default">关闭</a>
                </p>
            </div>
            <div class="weui-msg__extra-area">
                <div class="weui-footer">
                    <p class="weui-footer__links">
                        <a href="javascript:void(0);" class="weui-footer__link">底部链接文本</a>
                    </p>
                    <p class="weui-footer__text">Copyright © 2008-2016 weui.io</p>
                </div>
            </div>
        </div>
        <script src="/lib/jquery-2.1.4.js"></script>
        <script src="/lib/fastclick.js"></script>
        <script>
        $(function() {
            FastClick.attach(document.body);
        });
        </script>
        <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
        <script src="/js/jquery-weui.js"></script>
        <script type="text/javascript">
            var buttonfun = <%- docs.buttonFun ? docs.buttonFun.toString() : "null" %>;
            var jssdk = <%- JSON.stringify(docs.jssdk) %>;
            jssdk.jsApiList = ["closeWindow","hideMenuItems"];
            wx.config(jssdk);
            wx.ready(function(){
                wx.hideMenuItems({
                    menuList: [
                        "menuItem:editTag",
                        "menuItem:delete",
                        "menuItem:copyUrl",
                        "menuItem:originPage",
                        "menuItem:readMode",
                        "menuItem:openWithQQBrowser",
                        "menuItem:openWithSafari",
                        "menuItem:share:email",
                        "menuItem:share:brand",
                        "menuItem:share:appMessage",
                        "menuItem:share:timeline",
                        "menuItem:share:qq",
                        "menuItem:share:weiboApp",
                        "menuItem:favorite",
                        "menuItem:share:facebook",
                        "menuItem:share:QZone"
                    ] // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
                });
                $("#close").on("click",function(){
                    wx.closeWindow();
                });
                if(buttonfun)
                    $('#button').on("click", buttonfun);
            });

            </script>
        </body>
        </html>
